<?
	include("com/cstr.php");
	include("com/website_config.php");
	$pathurltrue=__FILE__;
	$pathurl=basename($pathurltrue,".php");
	  	$PageSize = 12 ;             //每页显示记录数
	$StartRow = 0;             //指针在数据库的初始位置
						   //获取需要显示的页数，由用户提交
	$getpage=(int)$_GET['PageNo'];
	if(empty($getpage)){        //如果为空，则表示第1页
	if($StartRow == 0){
	$PageNo = $StartRow + 1;    //设定为1
	}
	}else{
	$PageNo = (int)$_GET['PageNo'];         //获得用户提交的页数
	$StartRow = ($PageNo - 1) * $PageSize;  //获得开始显示的记录编号
	}
	
	if($PageNo % $PageSize == 0){
	$CounterStart = $PageNo - ($PageSize - 1);
	}else{
	$CounterStart = $PageNo - ($PageNo % $PageSize) + 1;
	}
	//显示页码的最大值
	$CounterEnd = $CounterStart + ($PageSize - 1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>租车常识-<? echo $title;?></title>
<link rel="shortcut icon" href="/favicon.ico"/>
<link href="css/css.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.ashlybus.com/js/jquery-1.9.1.min.js"></script>
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?429d331d02551c5c42fbfb2982cfcf64"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>

<body>
<? include("top.php");?>

<div class="jiange"></div>
<div class="nowplace">当前位置：<span><a href="/">首页</a></span><span>&nbsp;>&nbsp;</span><span>租车常识</span></div>

<div class="jiange"></div>
<div class="innerbox">
  <div class="innerleft2 fl">
    <div class="innerleft_title">租车常识</div>
  </div>
  <div class="innerright fr">
    <div class="innertit2"></div>
    <div class="inner_news_li">
      <ul>
	  <?				
					 $typeid_array=(int)$_GET['typeid'];
					 if($typeid==""){
						//$typeid=;
						$typeid_array="5";
					 }
					global $record;
					global $TRecord;
					
					$db = new DataAccess();
					$db->connect();
					
					$query = "select * from ms_product where pro_tid in ($typeid_array) order by pro_id desc";
					$query2 = "select * from ms_product where pro_tid in ($typeid_array) order by pro_id desc LIMIT $StartRow,$PageSize";
					
					$TRecord = $db->query($query);
					$record = $db->query($query2);
				
				$rs1=mysql_num_rows($TRecord);
				if($rs1==""){
						echo"<p align=center>".'暂时还没有信息!'."</p>";
				}
				else
				{
					//获取总记录数
					$RecordCount = mysql_num_rows($TRecord);
					//获取总页数
					$MaxPage = $RecordCount % $PageSize;
					if($RecordCount % $PageSize == 0){
						$MaxPage = $RecordCount / $PageSize;
					}
					else{
					}          
					$MaxPage = ceil($RecordCount / $PageSize);
					
					$i = 1;
					while($array=mysql_fetch_array($record))
						{
						  $bil = $i + ($PageNo-1)*$PageSize;	  
				?>
      <li><a href="zccs_details.php?detail_id=<? echo $array["pro_id"];?>"><? echo $array["pro_title"]; ?></a></li>
	   <? 
					  $i++;
					}
?>
	  </ul>
      <div class="cl"></div>
               <div class="page">
			   <? 
	if($MaxPage>1){
	include ('com/page_pro.php');
	}else{
	}
	?></div>
	<? 
		}
	?>
    </div>
  </div>
  <div class="cl"></div>
</div>
<? include("foot.php");?>
</body>
</html>
